package com.soft.javase.ch04.interfaces.computer;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/22
 */
public class Test {
    public static void main(String[] args) {

        IStorage storage = new UPan();
        storage = new MP3();
        Computer computer = new Computer(storage);

        Light light = new Light();
        computer.setiStorage(light);

        //硬盘读数据
        computer.readData();

        //硬盘写数据
        computer.writeData();

        light.light();
    }
}
